//Source file: D:\\aaa\\com\\ce\\pms\\renovation\\model\\PassChargeItemDO.java

package com.ce.pms.renovation.model;

import java.math.BigDecimal;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.ce.pms.common.util.BigDecimalUtil;
import com.ce.pms.system.renovation.model.PassChargeItemConfigDO;

/**
 * 出入证收费项目
 *
 * @author yandawei
 * @CreateDate:2008-12-17
 */
@Entity
@DiscriminatorValue("002")
public class PassChargeItemDO extends AbstractChargeItemDO {

	/**
	 *
	 */
	private static final long serialVersionUID = -6843273024771372265L;

	/**
	 * 出入证
	 */
	@ManyToOne()
	@JoinColumn(name = "HOST_ID")
	private PassDO pass;

	/**
	 * 出入证收费项目配置
	 */
	@ManyToOne
	@JoinColumn(name = "ITEM_CONFIG_ID")
	private PassChargeItemConfigDO itemConfig;

	/**
	 * @roseuid 494085720119
	 */
	public PassChargeItemDO() {

	}

	public PassChargeItemConfigDO getItemConfig() {
		return itemConfig;
	}

	public void setItemConfig(PassChargeItemConfigDO itemConfig) {
		this.itemConfig = itemConfig;
	}

	public PassDO getPass() {
		return pass;
	}

	public void setPass(PassDO pass) {
		this.pass = pass;
	}

	@Override
	public BigDecimal calculateFee() {
		return BigDecimalUtil.warpResult(this.getItemConfig().getPrice());
	}


}
